<?php

namespace app\admin\controller;

use app\common\model\ProductModel;
use app\common\service\ProductService;

class Product extends Base
{
    /**
     * 显示资源列表
     */
    public function index()
    {
        return $this->fetch();
    }

    public function api()
    {
        $page   = input('page') ? input('page') : 1;
        $limit  = input('limit') ? input('limit') : 15;
        $server = new ProductService();
        return $server->_list($page, $limit);
    }
}
